
    <div class="content margin_top_foot">
        <header class="header fixed_top bg_mx_green"></header>
        <div class="font_16 margin_b_10 bg_white lineheight_4 text_center flex title_nav">
            <div class="flex_1 <{if is_null($status)}>active_border<{/if}>"><a href="<{url route='/business/user/my-pigs'}>">全部</a></div>
            <div class="flex_1 <{if $status==2}>active_border<{/if}>"><a href="<{url route='/business/user/my-pigs?status=2'}>">饲养中</a></div>
            <div class="flex_1 <{if $status==3}>active_border<{/if}>"><a href="<{url route='/business/user/my-pigs?status=3'}>">已出栏</a></div>
            <div class="flex_1 <{if $status==4}>active_border<{/if}>"><a href="<{url route='/business/user/my-pigs?status=4'}>">待宰杀</a></div>
            <div class="flex_1 <{if $status==5}>active_border<{/if}>"><a href="<{url route='/business/user/my-pigs?status=5'}>">已宰杀</a></div>

        </div>
        <div class="lists bg_white"></div>
        <footer class="foot_tab fixed_bottom mx_green font_16"></footer>
    </div>
    <script type="text/template" charset="utf-8" id='list_template'>
        {{if(it.length == 0){}}
            <div class="padding_15 border_b font_12 flex" style="text-align: center">
                抱歉，您还没有认养过小猪在哦~ <a href="/shop/rasing/pre-index">点击</a>立即认养
            </div>
        {{}else{}}
            {{for(var i=0;i<it.length;i++){}}
            <div class="padding_15 border_b font_12 flex" onclick="location.href='{{=it[i].url}}'">
                <div class="width_100">
                    <img src="{{=it[i].img}}" alt="">
                </div>
                <div class="left_100 padding_l_15">
                    <div class="v_center">
                        <div class="left_70 padding_r_10">
                            <div class="font_14">{{=it[i].type}}</div>
                            <div class="light">{{=it[i].address}}</div>
                        </div>
                        <div class="width_70 text_center">
                            <div class="mx_green margin_b_10">{{=it[i].status}}</div>
                                <div class="bg_mx_green circle_5">{{=it[i].btn}}</div>
                        </div>
                    </div>
                </div>
            </div>
            {{}}}
        {{}}}

    </script>
    <script>
        // 仔猪列表
//            var lists = [
//                {type:"秦岭黑1号",status:"成长中",address:"商洛市柞水县盘龙镇张家村张三家",img:"/static/images/pig3.jpg"},
//                {type:"秦岭黑1号",status:"待宰杀",address:"商洛市柞水县盘龙镇张家村张三家",img:"/static/images/pig3.jpg"},
//                {type:"秦岭黑1号",status:"成长中",address:"商洛市柞水县盘龙镇张家村张三家",img:"/static/images/pig3.jpg"},
//                {type:"秦岭黑1号",status:"已宰杀",address:"商洛市柞水县盘龙镇张家村张三家",img:"/static/images/pig3.jpg"},
//                {type:"秦岭黑1号",status:"成长中",address:"商洛市柞水县盘龙镇张家村张三家",img:"/static/images/pig3.jpg"}
//            ];
            var lists = <{$pigs}>;
            var evallist = doT.template($("#list_template").text());
            loaddata(".lists",evallist,lists)
        // 页面初始化
            loadheadbar("我的仔猪");
            loadfootbar();
    </script>


